package com.zsyg.sys.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import com.zsyg.sys.entity.SysLog;
import com.zsyg.sys.mapper.SysLogMapper;
import com.zsyg.sys.service.SysLogService;
import com.zsyg.common.base.BaseServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 日志表 服务实现类
 * </p>
 *
 * @author YangWanLi
 * @since 2018-08-16
 */
@Service
public class SysLogServiceImpl extends BaseServiceImpl<SysLogMapper, SysLog> implements SysLogService {

    @Autowired
    private SysLogMapper sysLogMapper;

    /**
     * 分页
     * @param page
     * @param sysLog
     * @return
     */
    @Override
    public PageInfo<SysLog> findPage (Page<SysLog> page, SysLog sysLog){
        page = PageHelper.startPage(page.getPageNum(),page.getPageSize());
        sysLogMapper.findAll(sysLog);
        return page.toPageInfo();
    }

}
